<!-- 模态窗口编辑模板 -->
<!-- 窗口标题开始 -->
<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
	<h4 class="modal-title" style="font-weight:bold;">公司信息</h4>
</div>
<!-- 窗口标题结束-->
<!-- 内容开始 -->
<div class="modal-body">
	<div class="portlet-body form">
		<div class="form-body">
			<div class="form-group form-md-radios" >
			<div class="clearfix">
			<div style="float: left; margin-bottom:10px;width:100%;">
				   <div style="width:110px; float:left;">
						<select class="form-control" id="attribute">
						  <option value="a.companyName">公司名称</option>
						  <option value="b.name">行业</option>
						  <option value="a.commands">描述</option>
						</select>
					</div>
					<div  style="width:110px; float:left; margin-left:15px;">
						<select class="form-control" id="operator">
							  <option value="1">包含</option>
					          <option value="2">不包含</option>
					          <option value="3">等于</option>
					          <option value="4">不等于</option>
					          <option value="5">开始字符</option>
					          <option value="6">结束字符</option>
					          <option value="7">为空</option>
					          <option value="8">不为空</option>
						</select>
					</div>
					<div style="width:250px; float:left; margin-left:15px;">
						<input type="text" class="form-control" id="content">
					</div>
					<input type="hidden" id="attributeHidden"/>
					<input type="hidden" id="operatorHidden"/>
					<input type="hidden" id="contentHidden"/>
					
					<div style="width:80px; float:left; margin-left:15px;" onclick="queryByCondition()">
						<button  class="btn green" style="margin-left:15px;">
							<i class="fa fa-search"></i> 搜索 
						</button>
					</div>
			</div>
			</div>
			
			<div class="dataDiv">
				<table id="grid">
					<tr>
						<td>
							<div class="loadingAjax">
							</div>
						</td>
					</tr>
				</table>
				<br />
				<table width="667" class='ttTurnPageTbl'>
					<tr>

						<td id='perPageNum'></td>
						<td id="DataCount"></td>
						<td>
							<div style="width:150px;">
							<label onclick="prePage()" id="prePageBtn">上一页</label>&nbsp;&nbsp;
							<label onclick="nextPage()" id="nextPageBtn">下一页</label>
							</div>
						</td>
						<td id="CPofAP"></td>
						<td>转到：
							<select id="toPageNum" style="width:50px;"></select>页<input type="button" value="跳转" onClick="toPage()"></td>
					</tr>
				</table>
			</div>
			</div>
		</div>
	</div>
</div>
<!-- 内容结束 -->
<!-- 底部按钮开始 -->
<div class="modal-footer" style="text-align: center;">
	<button type="button" class="btn default fa fa-times" id="chooseCompanyClose" data-dismiss="modal">关闭</button>
	<button type="button" onclick="optionConfirm()" class="btn green  fa fa-check">选择</button>
</div>
<script>
var actionUrl=BASE_URL+'/contacter/getAllCompany.do';
var titleArr=['公司名称', '行业', '备注'];
var nameArr=['companyName','industry', 'commands'];
function optionConfirm(){
	var selTr = $("#grid tbody tr.companyClickColor");
	if(selTr.length > 0){
		var id = selTr.children("td:first").attr("data_id");
		var name = selTr.children("td:first").attr("data_name");
		$("#companyinputhi", parent.document).val(id);
		$("#companyinput", parent.document).val(name);
	}
	$("#chooseCompanyClose").click();
}
</script>
<script src="${request.getContextPath()}/Public/js/customerDetail/localCustomerPaging.js" type="text/javascript"></script>